Network.IsConnected Method
Returns a Boolean. Returns True if connected to a network.
Syntax
If it returns False, then using sockets may cause a dial-up to occur. This function is not supported on Linux and will always return False.